﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace HZ.Supervise.Web.CommonProgram
{
    /// <summary>
    /// 用于jquery调用以生成树形菜单所需要的数据
    /// 董辉
    /// 2011-4-24 23:16
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class ProcessTree : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "application/json";

			string areaid =HttpUtility.UrlDecode( context.Request["areid"]);

            HZ.Supervise.IBLL.IBLL_Area area = HZ.Supervise.BLLFactory.IBLL_Area();

			System.Web.HttpContext.Current.Response.Write(area.GetJSON(areaid).ToString());

            System.Web.HttpContext.Current.Response.Flush();

            System.Web.HttpContext.Current.Response.End();
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
